.class public Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;
.super Lcom/burstly/lib/util/UiSafeWebView;
.source "LoadingAwareWebView.java"

# interfaces
.implements Landroid/view/View$OnTouchListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView$LoadingWebClient;
    }
.end annotation


# instance fields
.field mFirstTimeLoad:Z

.field private mProgressDialogLayout:Landroid/widget/FrameLayout;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 89
    invoke-direct {p0, p1}, Lcom/burstly/lib/util/UiSafeWebView;-><init>(Landroid/content/Context;)V

    .line 41
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->mFirstTimeLoad:Z

    .line 90
    invoke-virtual {p0, p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 91
    new-instance v0, Landroid/webkit/WebViewClient;

    invoke-direct {v0}, Landroid/webkit/WebViewClient;-><init>()V

    invoke-virtual {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 92
    return-void
.end method


# virtual methods
.method public hideLoadingBar()Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;
    .locals 1

    .prologue
    .line 118
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->mProgressDialogLayout:Landroid/widget/FrameLayout;

    if-eqz v0, :cond_0

    .line 119
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->mProgressDialogLayout:Landroid/widget/FrameLayout;

    invoke-virtual {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->removeView(Landroid/view/View;)V

    .line 120
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->mProgressDialogLayout:Landroid/widget/FrameLayout;

    .line 122
    :cond_0
    return-object p0
.end method

.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .locals 1
    .parameter "v"
    .parameter "event"

    .prologue
    .line 130
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    .line 138
    :cond_0
    :goto_0
    const/4 v0, 0x0

    return v0

    .line 133
    :pswitch_0
    invoke-virtual {p1}, Landroid/view/View;->hasFocus()Z

    move-result v0

    if-nez v0, :cond_0

    .line 134
    invoke-virtual {p1}, Landroid/view/View;->requestFocus()Z

    goto :goto_0

    .line 130
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_0
    .end packed-switch
.end method

.method public setWebViewClient(Landroid/webkit/WebViewClient;)V
    .locals 1
    .parameter "client"

    .prologue
    .line 96
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView$LoadingWebClient;

    invoke-direct {v0, p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView$LoadingWebClient;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;Landroid/webkit/WebViewClient;)V

    invoke-super {p0, v0}, Lcom/burstly/lib/util/UiSafeWebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 97
    return-void
.end method

.method public showLoadingBar()Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;
    .locals 2

    .prologue
    .line 105
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->mProgressDialogLayout:Landroid/widget/FrameLayout;

    if-nez v0, :cond_0

    .line 106
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingBarView;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingBarView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->mProgressDialogLayout:Landroid/widget/FrameLayout;

    .line 107
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->mProgressDialogLayout:Landroid/widget/FrameLayout;

    invoke-virtual {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/LoadingAwareWebView;->addView(Landroid/view/View;)V

    .line 109
    :cond_0
    return-object p0
.end method
